package com.yunhai.model.entity.ums;
import com.baomidou.mybatisplus.annotation.*;
import com.yunhai.model.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.List;

@ApiModel(value = "UmsPermission", description = "权限实体（菜单/按钮）")
@TableName("ums_permission")
@Data
@Accessors(chain = true)
public class UmsPermission  extends BaseEntity {

    @ApiModelProperty(value = "权限ID", example = "10001")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "父级权限ID", example = "0")
    private Long parentId;

    @ApiModelProperty(value = "权限类型（0-菜单文件夹 1-菜单 2-按钮）", example = "1")
    private Integer type;

    @ApiModelProperty(value = "权限名称", required = true, example = "用户管理")
    private String permissionName;

    @ApiModelProperty(value = "权限标识", example = "sys:user:list")
    private String permissionCode;

    @ApiModelProperty(value = "备注信息", example = "用户管理菜单权限")
    private String remark;

    @TableField( exist = false )
    private List<UmsPermission> children;
}
